/*
 * ddatatypes.h
 *
 *  Created on: 2010-9-6
 *      Author: wenjian
 */

#ifndef DDATATYPES_H_
#define DDATATYPES_H_

namespace Ed {

  //实型定义
  #ifndef real
    #define real float
  #endif

  /**
   * 图层或元素的鼠标事件响应模式
   */
  enum MouseEventMode{
    MEventMode_Hovering, //鼠标正悬停的层或元素
    //MEventMode_All, //所有图层或元素
    MEventMode_Top, //仅顶层或元素
    MEventMode_Manual //指定层或元素
  };

//  /**
//   * 层鼠标事件模式
//   */
//  enum LayerMouseEventMode{
//    LayerModeStandard,  //标准
//    //永远响应鼠标事件
//  };

  /**
   * 层中元素绘制模式
   */
  enum DrawMode{
      DrawMode_Region, //区域绘制，仅绘制被修改过的可视元素, (默认)
      DrawMode_All      //绘制所有可视元素
  };

  /**
   * 鼠标按钮状态定义
   */
  enum MouseButton {
    MButton_No = 0x0000,
    MButton_Left = 0x0001,
    MButton_Right = 0x0002,
    MButton_Mid = 0x0010,
    MButton_X1 = 0x0020,
    MButton_X2 = 0x0040,
    MButton_Mask = 0x00ff,
  };

  /**
   * 方向
   */
  enum Orientation {
      Horizontal = 0x1, //水平，横向
      Vertical = 0x2,    //垂直，纵向
      HorizontalAndVertical = Horizontal | Vertical //双向
  };


  /**
   * 键定义
   */
  enum Key {
    Key_Back=8,
    Key_Tab=9,
    Key_Clear=12,
    Key_Return=13,
    Key_Shift=16,
    Key_Control=17,
    Key_Menu=18,
    Key_Pause=19,
    Key_Capital=20,
    Key_Kana=0x15,
    Key_Hangeul=0x15,
    Key_Hangul=0x15,
    Key_Junja=0x17,
    Key_Final=0x18,
    Key_Hanja=0x19,
    Key_Kanji=0x19,
    Key_Escape=0x1b,
    Key_Convert=0x1c,
    Key_Nonconvert=0x1d,
    Key_Accept=0x1e,
    Key_Modechange=0x1f,
    Key_Space=32,
    Key_Prior=33,
    Key_Next=34,
    Key_End=35,
    Key_Home=36,
    Key_Left=37,
    Key_Up=38,
    Key_Right=39,
    Key_Down=40,
    Key_Select=41,
    Key_Print=42,
    Key_Execute=43,
    Key_Snapshot=44,
    Key_Insert=45,
    Key_Delete=46,
    Key_Help=47,
    Key_Lwin=0x5b,
    Key_Rwin=0x5c,
    Key_Apps=0x5d,
    Key_Sleep=0x5f,
    Key_Numpad0=0x60,
    Key_Numpad1=0x61,
    Key_Numpad2=0x62,
    Key_Numpad3=0x63,
    Key_Numpad4=0x64,
    Key_Numpad5=0x65,
    Key_Numpad6=0x66,
    Key_Numpad7=0x67,
    Key_Numpad8=0x68,
    Key_Numpad9=0x69,
    Key_Multiply=0x6a,
    Key_Add=0x6b,
    Key_Separator=0x6c,
    Key_Subtract=0x6d,
    Key_Decimal=0x6e,
    Key_Divide=0x6f,
    Key_F1=0x70,
    Key_F2=0x71,
    Key_F3=0x72,
    Key_F4=0x73,
    Key_F5=0x74,
    Key_F6=0x75,
    Key_F7=0x76,
    Key_F8=0x77,
    Key_F9=0x78,
    Key_F10=0x79,
    Key_F11=0x7a,
    Key_F12=0x7b,
    Key_F13=0x7c,
    Key_F14=0x7d,
    Key_F15=0x7e,
    Key_F16=0x7f,
    Key_F17=0x80,
    Key_F18=0x81,
    Key_F19=0x82,
    Key_F20=0x83,
    Key_F21=0x84,
    Key_F22=0x85,
    Key_F23=0x86,
    Key_F24=0x87,
    Key_Numlock=0x90,
    Key_Scroll=0x91,
    Key_Lshift=0xa0,
    Key_Rshift=0xa1,
    Key_Lcontrol=0xa2,
    Key_Rcontrol=0xa3,
    Key_Lmenu=0xa4,
    Key_Rmenu=0xa5
  };

}

#endif /* DDATATYPES_H_ */
